﻿#ifndef APPLICATIONDIALOG_H
#define APPLICATIONDIALOG_H

#include <QDialog>
#include <QMouseEvent>

namespace Ui {
class ApplicationDialog;
}

class ApplicationDialog : public QDialog
{
    Q_OBJECT

public:
    explicit ApplicationDialog(const QString &email,QWidget *parent = nullptr);
    ~ApplicationDialog();
    void setText(const QString &text);
    void setNoteName(const QString &notename);
signals:
    void sendApplication(const QString &email,const QString &content,const QString & notename);
    void finished();
protected:
    void mousePressEvent(QMouseEvent* event);
    void mouseMoveEvent(QMouseEvent* event);
    void mouseReleaseEvent(QMouseEvent* event);
private:
    Ui::ApplicationDialog *ui;
    bool isDragging=false;
    QPoint lastPos;
    QString email;
};

#endif // APPLICATIONDIALOG_H
